package ru.linnenson.darshana.infrastructure.persistence;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import ru.linnenson.darshana.infrastructure.persistence.models.PhysicTaskStore;
import ru.linnenson.darshana.infrastructure.persistence.repositories.PhysicTaskPersistenceRepository;
import ru.linnenson.darshana.infrastructure.rest.dto.PhysicTasksCriteria;

@Service
@Slf4j
@RequiredArgsConstructor
public class TaskQueryServiceImpl implements TaskQueryService {

  private final PhysicTaskPersistenceRepository physicTaskPersistenceRepository;

  @Override
  public Page<PhysicTaskStore> find(final PhysicTasksCriteria criteria, final Pageable pageable) {

    

    return physicTaskPersistenceRepository.findAll(null, pageable);
  }
}
